<#assign pageName="发送消息">
<@override name="head-styles">
</@override>
<@override name="page-content">
    <fieldset class="layui-elem-field layui-field-title">
        <legend>${pageName}</legend>
    </fieldset>
    <form novalidate="" id="formMessageAdd" class="layui-form form-horizontal" role="form" method="post" style="margin-right:100px;">
        <@ctrl.SingleSelect path="bsMessageInfo.type" options={"1":"公共消息"} labelText="消息类型" text="1" value="0" required="required"/>
        <@ctrl.Textbox path="bsMessageInfo.title" labelText="消息标题"/>
        <@ctrl.Textarea path="bsMessageInfo.content" labelText="消息内容" required="required"/>
        <@ctrl.FormAction backURL="manage"/>
   </form>
</@override>
<@override name="page-scripts">
    <script>
        $(function(){
            layui.use(['form','layer','jquery'], function(){
                var form = layui.form;
                var layer = layui.layer;
                $=layui.jquery;
              //监听提交
                form.on('submit(submit)', function(data){
                    var data = $(data.form).serialize();
                    submitData(data, '${contextPath}/message/send/add', function(){location.href="${contextPath}/message/send/manage";});
                    return false;
                });
            })
        })
    </script>
</@override>
<@extends name="/layout/basepage.html"/> 
